package com.epfresh.supplier.entity;

import android.text.TextUtils;

import java.util.List;

public class Store {

    private String modifiedTime;
    private String statusStr;
    private String description;
    private String cityId;
    private String managerName;
    private String lastAuditMark;
    private String managerPhone;
    private String logo;
    private String createdTime;
    private String id;
    private String openTime;
    private String backgroundImgUrl;
    private String images;
    private String address;
    private String onShelvesProductCount;
    private String provinceId;
    private String logoUrl;
    private List<HomeCommTag> tags;
    private String market;
    private int accountId;
    private String districtId;
    private String auditStatusStr;
    private String phone;
    private String isAcceptOrders;
    private Boolean saleChannelApp;
    private String name;
    //审核中0;审核通过1;审核不通过2;-1未提交审核
    private String auditStatus;
    private String accountNickname;
    private String backgroundImageId;
    private String headerImageId;
    private String headerImage;
    private int status;
    private boolean isDc;

    private String deliveryMinAmount;//起送金额
    private boolean supplierDelivery;//是否是商家配送 true 为商家配送

    public String getDeliveryMinAmount() {
        return deliveryMinAmount;
    }

    public void setDeliveryMinAmount(String deliveryMinAmount) {
        this.deliveryMinAmount = deliveryMinAmount;
    }

    public boolean isSupplierDelivery() {
        return supplierDelivery;
    }

    public void setSupplierDelivery(boolean supplierDelivery) {
        this.supplierDelivery = supplierDelivery;
    }

    public boolean isDc() {
        return isDc;
    }

    public void setDc(boolean dc) {
        isDc = dc;
    }

    public String getHeaderImageUrl() {
        return headerImage;
    }

    public void setHeaderImageUrl(String headerImageUrl) {
        this.headerImage = headerImageUrl;
    }

    public String getHeaderImageId() {
        return headerImageId;
    }

    public void setHeaderImageId(String headerImageId) {
        this.headerImageId = headerImageId;
    }

    public String getModifiedTime() {
        return this.modifiedTime;
    }

    public void setModifiedTime(String modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public String getStatusStr() {
        return this.statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCityId() {
        return this.cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getManagerName() {
        return this.managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public String getLastAuditMark() {
        return this.lastAuditMark;
    }

    public void setLastAuditMark(String lastAuditMark) {
        this.lastAuditMark = lastAuditMark;
    }

    public String getManagerPhone() {
        return this.managerPhone;
    }

    public void setManagerPhone(String managerPhone) {
        this.managerPhone = managerPhone;
    }

    public String getLogo() {
        return this.logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getCreatedTime() {
        return this.createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOpenTime() {
        return this.openTime;
    }

    public void setOpenTime(String openTime) {
        this.openTime = openTime;
    }

    public String getBackgroundImgUrl() {
        return this.backgroundImgUrl;
    }

    public void setBackgroundImgUrl(String backgroundImgUrl) {
        this.backgroundImgUrl = backgroundImgUrl;
    }

    public String getImages() {
        return this.images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getOnShelvesProductCount() {
        return this.onShelvesProductCount;
    }

    public void setOnShelvesProductCount(String onShelvesProductCount) {
        this.onShelvesProductCount = onShelvesProductCount;
    }

    public String getProvinceId() {
        return this.provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getLogoUrl() {
        return this.logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl;
    }

    public List<HomeCommTag> getTags() {
        return tags;
    }

    public void setTags(List<HomeCommTag> tags) {
        this.tags = tags;
    }

    public String getMarket() {
        return this.market;
    }

    public void setMarket(String market) {
        this.market = market;
    }

    public int getAccountId() {
        return this.accountId;
    }

    public void setAccountId(int accountId) {
        this.accountId = accountId;
    }

    public String getDistrictId() {
        return this.districtId;
    }

    public void setDistrictId(String districtId) {
        this.districtId = districtId;
    }

    public String getAuditStatusStr() {
        return this.auditStatusStr;
    }

    public void setAuditStatusStr(String auditStatusStr) {
        this.auditStatusStr = auditStatusStr;
    }

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIsAcceptOrders() {
        return this.isAcceptOrders;
    }

    public void setIsAcceptOrders(String isAcceptOrders) {
        this.isAcceptOrders = isAcceptOrders;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuditStatus() {
        return this.auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getAccountNickname() {
        return this.accountNickname;
    }

    public void setAccountNickname(String accountNickname) {
        this.accountNickname = accountNickname;
    }

    public String getBackgroundImageId() {
        return this.backgroundImageId;
    }

    public void setBackgroundImageId(String backgroundImageId) {
        this.backgroundImageId = backgroundImageId;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public boolean isLegal() {

        return !TextUtils.isEmpty(id);
    }

    public boolean isOpen() {
        if (isAcceptOrders != null && "0".equals(isAcceptOrders)) {
            return false;
        }
        return true;
    }
    public boolean isOffline() {
        if (saleChannelApp != null && !saleChannelApp) {
            return false;
        }
        return true;
    }

    public void setOffline(boolean isOffline) {
        saleChannelApp = isOffline;
    }


    public void setAcceptOrders(boolean isOpen) {
        isAcceptOrders = isOpen ? "1" : "0";
    }

    @Override
    public String toString() {
        return "Store{" +
                "modifiedTime='" + modifiedTime + '\'' +
                ", statusStr='" + statusStr + '\'' +
                ", description='" + description + '\'' +
                ", cityId='" + cityId + '\'' +
                ", managerName='" + managerName + '\'' +
                ", lastAuditMark='" + lastAuditMark + '\'' +
                ", managerPhone='" + managerPhone + '\'' +
                ", logo='" + logo + '\'' +
                ", createdTime='" + createdTime + '\'' +
                ", id='" + id + '\'' +
                ", openTime='" + openTime + '\'' +
                ", backgroundImgUrl='" + backgroundImgUrl + '\'' +
                ", images='" + images + '\'' +
                ", address='" + address + '\'' +
                ", onShelvesProductCount='" + onShelvesProductCount + '\'' +
                ", provinceId='" + provinceId + '\'' +
                ", logoUrl='" + logoUrl + '\'' +
                ", tags='" + tags + '\'' +
                ", market='" + market + '\'' +
                ", accountId=" + accountId +
                ", districtId='" + districtId + '\'' +
                ", auditStatusStr='" + auditStatusStr + '\'' +
                ", phone='" + phone + '\'' +
                ", isAcceptOrders='" + isAcceptOrders + '\'' +
                ", name='" + name + '\'' +
                ", auditStatus='" + auditStatus + '\'' +
                ", accountNickname='" + accountNickname + '\'' +
                ", backgroundImageId='" + backgroundImageId + '\'' +
                ", status=" + status +
                '}';
    }
}
